package com.qingke.OMS.Command;

import java.util.HashMap;
import java.util.Map;

import com.qingke.OMS.Command.Imp.LoginCommand;
import com.qingke.OMS.Command.Imp.LoginOut;
import com.qingke.OMS.Command.Imp.OrderdsOptionCommandImp;
import com.qingke.OMS.Command.Imp.SignupCommand;
import com.qingke.OMS.Command.Imp.UserHelpCommand;
import com.qingke.OMS.Unit.LauncherEnum;



public class UserCommand extends StaticCommandFactory {

	protected static Map<LauncherEnum,Command> userMap = new HashMap<LauncherEnum,Command>();
	static{
		
         userMap.put(LauncherEnum.USERHELP, new UserHelpCommand());
		 userMap.put(LauncherEnum.EXIT, new ExitCommand());
	     userMap.put(LauncherEnum.LOGIN, new LoginCommand());
	     userMap.put(LauncherEnum.SIGNUP, new SignupCommand());
	     userMap.put(LauncherEnum.LOGINOUT, new LoginOut());
	     userMap.put(LauncherEnum.OPTIONORDERS, new OrderdsOptionCommandImp());

	}

	public Command build(LauncherEnum cmd){
		Command command = userMap.get(cmd);
		return command;
	}
}
